g_MSTDebuff = new class monsterDebuffManager {
    constructor() {
        this.time = 0;
    }
    //设置毒debuff
    setPoision(monster, debuff) {
        monster.debuff = debuff;
    }
    //扣血
    onPoisioned(monster) {
        let hurt = monster.debuff * 10;
        monster.HP -= hurt;
        g_Hurt.showHurtLabel(monster, hurt, 2);
    }
    //遍历monsterlist查找中毒的monster，并扣血
    update(dt) {
        this.time += dt;
        if (this.time >= 1) {
            this.time -= 1;
            let monsterLst = g_Monster.getAllMonster();
            // cc.log("monsterLst", monsterLst);
            for (let id in monsterLst) {
                let tmonster = monsterLst[id];
                if (tmonster) {
                    this.onPoisioned(tmonster);
                }
            }
        }
    }
}